package com.ruoyi.edh.mapper;

import com.ruoyi.edh.domain.EdhShoppingAddress;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;


/**
 * 易订货-收货地址Mapper接口
 *
 * @author xxx
 * @date 2020-09-02
 */
public interface EdhShoppingAddressMapper {
    /**
     * 查询易订货-收货地址
     *
     * @param id 易订货-收货地址ID
     * @return 易订货-收货地址
     */
    public EdhShoppingAddress selectEdhShoppingAddressById(Long id);

    /**
     * 查询易订货-收货地址列表
     *
     * @param edhShoppingAddress 易订货-收货地址
     * @return 易订货-收货地址集合
     */
    public List<EdhShoppingAddress> selectEdhShoppingAddressList(EdhShoppingAddress edhShoppingAddress);

    /**
     * 新增易订货-收货地址
     *
     * @param edhShoppingAddress 易订货-收货地址
     * @return 结果
     */
    public int insertEdhShoppingAddress(EdhShoppingAddress edhShoppingAddress);

    /**
     * 修改易订货-收货地址
     *
     * @param edhShoppingAddress 易订货-收货地址
     * @return 结果
     */
    public int updateEdhShoppingAddress(EdhShoppingAddress edhShoppingAddress);

    /**
     * 删除易订货-收货地址
     *
     * @param id 易订货-收货地址ID
     * @return 结果
     */
    public int deleteEdhShoppingAddressById(Long id);

    /**
     * 批量删除易订货-收货地址
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteEdhShoppingAddressByIds(@Param("ids") String[] ids);

    @Update("update edh_shopping_address set sort = #{sort} where create_by = #{userId}")
	int updateSortByUserId(@Param("userId") Long userId, @Param("sort") String sort);
}
